package colbert.content.testFinal;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        GoldCard goldCard = new GoldCard("123456789","colbert","123456789",5000);
        pay(goldCard);
        SilverCard silverCard = new SilverCard("888888888889","colbert","123456789",2000);
        pay(silverCard);

    }
    // 写一个支付方法
    public static void pay(Card card){
        // 获取命令行输入数字
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入金额");
        double money = scanner.nextDouble();
        card.getMoney(money);
    }
}
